<div class="top-nav d-print-none container-xl">
	<div class="flex px-3 flex-center [container]">
		<a class="nav-link active" href="{:config('web.url')}/" target="_blank">
			<img src="{xycms:web name='logo'/}" height="37">
		</a>
		<div class="flex-1"></div>
		<div class="pr-5">
			<div class="flex flex-center py-2">
				<ul class="nav flex-1">
					<li class="nav-item">
		    			<a class="nav-link active" href="{:config('web.url')}/" target="_blank">首页</a>
					</li>
					<li class="nav-item">
		    			<a class="nav-link" href="{:config('web.url')}/article/type/all.html" target="_blank">热门资讯</a>
					</li>
				</ul>
			</div>
		</div>
		<div v-if="!userInfo.id">
			<a href="{xycms:web name='url'}/login" target="_self" class="el-link el-link--primary px-2">用户登录</a>
			<a href="{xycms:web name='url'}/register" target="_self" class="el-link el-link--primary px-2">免费注册</a>
		</div>
		<div v-else-if="userInfo.id  && userInfo.role_type===0">
			<el-dropdown trigger="click" class="py-3">
		      <div class="el-dropdown-link mr-2 el-link flex flex-center"
		      v-if="userInfo.resume_name">
		      	<div class="flex-1 text-truncate" style="max-width: 160px;">
		      		{{userInfo.resume_name}}
		      	</div>
		        <i class="el-icon-arrow-down el-icon--right"></i>
		      </div>
		      <div class="el-dropdown-link mr-2 el-link flex flex-center"
		      v-else>
		      	<div class="flex-1 text-truncate" style="max-width: 160px;">
		      		{{userInfo.nickname}}
		      	</div>
		        <i class="el-icon-arrow-down el-icon--right"></i>
		      </div>
		      <el-dropdown-menu slot="dropdown" class="top-nav-el-dropdown-menu">
		        <el-dropdown-item>
		        	<div class="d-block el-link el-link--info" 
		        	@click="window.open('{xycms:web name='url'/}/user/jobs/management');">我的投递</div>
		        </el-dropdown-item>
		        <el-dropdown-item>
		        	<div class="d-block el-link el-link--info" 
		        	@click="window.open('{xycms:web name='url'/}/user/account');">账号设置</div>
		        </el-dropdown-item>
		        <el-dropdown-item>
		        	<div class="d-block el-link el-link--info" 
		        	@click="goToCompany">去企业版</div>
		        </el-dropdown-item>
		        <el-dropdown-item>
		        	<div class="d-block el-link el-link--info" @click="outLogin('{xycms:web name='url'/}')">退出登录</div>
		        </el-dropdown-item>
		      </el-dropdown-menu>
		    </el-dropdown>
			<el-dropdown trigger="click" class="py-3">
		      <span class="el-dropdown-link mr-2 el-link">
		        简历<i class="el-icon-arrow-down el-icon--right"></i>
		      </span>
		      <el-dropdown-menu slot="dropdown" class="top-nav-el-dropdown-menu">
		        <el-dropdown-item>
		        	<div class="d-block el-link el-link--info" 
		        	@click="window.open('{xycms:web name='url'/}/user');">我的简历</div>
		        </el-dropdown-item>
		        <el-dropdown-item>
		        	<div class="d-block el-link el-link--info" 
		        	@click="window.open(userInfo.resume_id?'{xycms:web name='url'/}/resume/'+userInfo.resume_id+'.html':'{xycms:web name='url'/}/user');">预览简历</div>
		        </el-dropdown-item>
		        <el-dropdown-item>
		        	<div class="d-block el-link el-link--info" 
		        	@click="refreshResume">刷新简历</div>
		        </el-dropdown-item>
		      </el-dropdown-menu>
		    </el-dropdown>
		    <el-link href="{xycms:web name='url'/}/user/myMessage" :underline="false">消息({{view.message_count}})</el-link>
		</div>
		<div v-else="userInfo.id  && userInfo.role_type===1">
			<el-dropdown trigger="click" class="py-3">
		      <div class="el-dropdown-link mr-2 el-link flex flex-center"
		      v-if="userInfo.company_name">
		      	<div class="flex-1 text-truncate" style="max-width: 160px;">
		      		{{userInfo.company_name}}
		      	</div>
		        <i class="el-icon-arrow-down el-icon--right"></i>
		      </div>
		      <div class="el-dropdown-link mr-2 el-link flex flex-center"
		      v-else>
		      	<div class="flex-1 text-truncate" style="max-width: 160px;">
		      		{{userInfo.nickname}}
		      	</div>
		        <i class="el-icon-arrow-down el-icon--right"></i>
		      </div>
		      <el-dropdown-menu slot="dropdown" class="top-nav-el-dropdown-menu">
		        <el-dropdown-item>
		        	<div class="d-block el-link el-link--info" 
		        	@click="window.open('{xycms:web name='url'/}/user');">我的招聘</div>
		        </el-dropdown-item>
		        <el-dropdown-item>
		        	<div class="d-block el-link el-link--info" 
		        	@click="window.open('{xycms:web name='url'/}/user/account');">账号设置</div>
		        </el-dropdown-item>
		        <el-dropdown-item>
		        	<div class="d-block el-link el-link--info" 
		        	@click="goToPersonal">去个人版</div>
		        </el-dropdown-item>
		        <el-dropdown-item>
		        	<div class="d-block el-link el-link--info" @click="outLogin('{xycms:web name='url'/}')">退出登录</div>
		        </el-dropdown-item>
		      </el-dropdown-menu>
		    </el-dropdown>
			<el-dropdown trigger="click" class="py-3">
		      <span class="el-dropdown-link mr-2 el-link">
		        职位<i class="el-icon-arrow-down el-icon--right"></i>
		      </span>
		      <el-dropdown-menu slot="dropdown" class="top-nav-el-dropdown-menu">
		        <el-dropdown-item>
		        	<div class="d-block el-link el-link--info" 
		        	@click="window.open('{xycms:web name='url'/}/user/jobs/release');">发布职位</div>
		        </el-dropdown-item>
		        <el-dropdown-item>
		        	<div class="d-block el-link el-link--info" 
		        	@click="window.open('{xycms:web name='url'/}/user/jobs/management');">我的发布</div>
		        </el-dropdown-item>
		      </el-dropdown-menu>
		    </el-dropdown>
		    <el-link href="{xycms:web name='url'/}/user/myMessage" :underline="false">消息({{view.message_count}})</el-link>
		</div>
	</div>
</div>